package com.shisfish.library.Impl;

import java.util.List;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IBookCategoryInter;
import com.shisfish.library.Model.BookCategory;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class BookCategoryImpl implements IBookCategoryInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	IBookCategoryInter mapper = (IBookCategoryInter) ac.getBean("bookCategoryMapper");
	
	@Override
	public int insertOne(BookCategory t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<BookCategory> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateOne(BookCategory t) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateAll(List<BookCategory> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<BookCategory> selectById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<BookCategory> selectByKey(String key) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<BookCategory> selectAll() {
		// TODO Auto-generated method stub
		return mapper.selectAll();
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int countByCategory(String category) {
		// TODO Auto-generated method stub
		return mapper.countByCategory(category);
	}

	@Override
	public List<BookCategory> selectByCategory(String category,
			int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByCategory(category, currentPage, pageSize);
	}

	public List<BookCategory> selectByCode(int code) {
		// TODO Auto-generated method stub
		return mapper.selectByCode(code);
	}

}
